<?php

namespace common\models\tsline;

use Yii;

/**
 * This is the model class for table "{{%ts_article_statistic}}".
 *
 * @property int $id
 * @property int $article_id 文章ID
 * @property int $views 总浏览数
 * @property int $day_views 日浏览数
 * @property int $week_views 周浏览数
 * @property int $month_views 月浏览数
 * @property int $year_views 年浏览数
 * @property int $comments 评论数
 * @property int $likes 点赞数
 * @property int $shares 分享数
 * @property int $created_at 创建时间
 * @property int $updated_at 更新时间
 */
class TslineArticleStatistic extends \yii\db\ActiveRecord {

    use \common\traits\TimestampBehavior;
    use \common\traits\QueryInstanceActiveRecord;

    /**
     * @inheritdoc
     */
    public static function tableName() {
        return '{{%ts_article_statistic}}';
    }

    /**
     * @inheritdoc
     */
    public function rules() {
        return [
            [['article_id', 'views', 'day_views', 'week_views', 'month_views', 'year_views', 'comments', 'likes', 'shares', 'created_at', 'updated_at'], 'integer'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'article_id' => '文章ID',
            'views' => '总浏览数',
            'day_views' => '日浏览数',
            'week_views' => '周浏览数',
            'month_views' => '月浏览数',
            'year_views' => '年浏览数',
            'comments' => '评论数',
            'likes' => '点赞数',
            'shares' => '分享数',
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }

}
